package com.hilinos.base.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hilinos.base.user.entity.pojo.OrgDeptPoJo;
import com.hilinos.base.mapper.IOrgDeptMapper;
import com.hilinos.base.service.OrgDeptService;

import org.springframework.stereotype.Service;

/**
 *
 * @author hilinos
 * @since 2022-04-18
 */
@Service
public class OrgDeptServiceImpl extends ServiceImpl<IOrgDeptMapper, OrgDeptPoJo> implements OrgDeptService {

    @Override
    public OrgDeptPoJo detail(String deptId, String orgId, String appid) {
        QueryWrapper<OrgDeptPoJo> queryWrapper = new QueryWrapper<>();
        queryWrapper.lambda()
                .eq(OrgDeptPoJo::getAppid, appid)
                .eq(OrgDeptPoJo::getOrgId, orgId)
                .eq(OrgDeptPoJo::getDeptId, deptId);
        return getOne(queryWrapper);
    }

}